package uit.shoeshop.model;
import uit.shoeshop.dto.InformationDTO;
import uit.shoeshop.dao.InformationDAO;

import java.sql.SQLException;
public class AboutusModel {
	public AboutusModel(){
		
	}
	
	public InformationDTO getPageAboutUs() throws SQLException{
		InformationDTO result;
		InformationDAO informationTbl = new InformationDAO();
		
		result = informationTbl.getInformationByCode("aboutus");
		
		informationTbl = null;
		return result;
	}
	
	public int updatePageAboutUs(String title,String content) throws SQLException{
		int result = 1;
		InformationDAO informationTbl = new InformationDAO();
		
		result = informationTbl.updateInformationByCode("aboutus", title, content);
		
		informationTbl = null;
		return result;		
	}
}
